# -------------------------------------------
#    THUMB.PY SETTINGS FILE
# -------------------------------------------
# set `verbosity` level for unittest.TextTestRunner as
# defined in http://docs.python.org/lib/unittest-contents.html. 
# default is 1, which is quite terse.
# set to 2 if you want more details
thumb_verbosity 	    = 1  

# test file patterns 
# use '\/Test.*\.py$' if your test files look like "TestModels.py"
#  or '\\Test.*\.py$' if you're on windows
thumb_pattern		    = "\/.*_test\.py$"

# list of files you want to ignore from the coverage report
# For example: ['local_conf_sample.py', 'test/test_factory.py']
# Here is a typical one for django
thumb_ignore_files      = ['manage.py', 'local_conf_sample.py', 'db_dump.py', 'utils/dyndns.py', 'settings.py', 'local_conf.py', ]
thumb_ignore_folders    = ['test', ]

# Percentage of pass coverage. Default is 100, which is 100%
thumb_coverage_level    = 100

# -------------------------------------------
#   HOOKS BEFORE AND POST EXECUTION
# -------------------------------------------

"""Following is an example of setting up the test enviroment for django"""
from django.test.utils import setup_test_environment, teardown_test_environment
from django.test.utils import create_test_db, destroy_test_db
django_verbosity = 0
def pre_test_run():
    # django specific code for setup testing environemnt
    setup_test_environment()
    settings.DEBUG = False    
    create_test_db(django_verbosity)

def post_test_run():
    destroy_test_db(settings.DATABASE_NAME, django_verbosity)
    teardown_test_environment()

# -------------------------------------------
#   CUSTOMIZATION STARTS 
# -------------------------------------------
# Your own project specific settings goes here. 
# Here I'm changing django's database settings to 
# make it point to a test database
import settings
settings.LOG_LEVEL          =   100
settings.LOG_OUTPUT         =   (settings.PROJECT_BASE + 'test.log')
